<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::LoggerManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_logger_manager.html">LoggerManager</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibemb_1_1_logger_manager-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::LoggerManager Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>日志管理器  
 <a href="classlibemb_1_1_logger_manager.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_logger_8h_source.html">Logger.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for libemb::LoggerManager:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classlibemb_1_1_logger_manager.png" usemap="#libemb::LoggerManager_map" alt=""/>
  <map id="libemb::LoggerManager_map" name="libemb::LoggerManager_map">
<area href="classlibemb_1_1_singleton.html" alt="libemb::Singleton&lt; LoggerManager &gt;" shape="rect" coords="0,0,221,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0e793558661362cf0510d7f98a8d03c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_logger_manager.html#a0e793558661362cf0510d7f98a8d03c9">setRoot</a> (const std::string &amp;logDir)</td></tr>
<tr class="memdesc:a0e793558661362cf0510d7f98a8d03c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置日志根目录  <a href="classlibemb_1_1_logger_manager.html#a0e793558661362cf0510d7f98a8d03c9">More...</a><br /></td></tr>
<tr class="separator:a0e793558661362cf0510d7f98a8d03c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbfb81e4a48511453345c96466e1b4ec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_logger_manager.html#abbfb81e4a48511453345c96466e1b4ec">createLogger</a> (const std::string &amp;logName, int maxSize, int rotations=0)</td></tr>
<tr class="memdesc:abbfb81e4a48511453345c96466e1b4ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取日志器  <a href="classlibemb_1_1_logger_manager.html#abbfb81e4a48511453345c96466e1b4ec">More...</a><br /></td></tr>
<tr class="separator:abbfb81e4a48511453345c96466e1b4ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80a19c32c8089b78829e4c6328565fe1"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classlibemb_1_1_logger.html">Logger</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_logger_manager.html#a80a19c32c8089b78829e4c6328565fe1">getLogger</a> (const std::string logName)</td></tr>
<tr class="memdesc:a80a19c32c8089b78829e4c6328565fe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取日志器  <a href="classlibemb_1_1_logger_manager.html#a80a19c32c8089b78829e4c6328565fe1">More...</a><br /></td></tr>
<tr class="separator:a80a19c32c8089b78829e4c6328565fe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classlibemb_1_1_singleton"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classlibemb_1_1_singleton')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classlibemb_1_1_singleton.html">libemb::Singleton&lt; LoggerManager &gt;</a></td></tr>
<tr class="memitem:af2acc898c83174290b0309c42a794cff inherit pub_static_methods_classlibemb_1_1_singleton"><td class="memItemLeft" align="right" valign="top"><a id="af2acc898c83174290b0309c42a794cff"></a>
static <a class="el" href="classlibemb_1_1_logger_manager.html">LoggerManager</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
<tr class="separator:af2acc898c83174290b0309c42a794cff inherit pub_static_methods_classlibemb_1_1_singleton"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classlibemb_1_1_singleton"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classlibemb_1_1_singleton')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classlibemb_1_1_singleton.html">libemb::Singleton&lt; LoggerManager &gt;</a></td></tr>
<tr class="memitem:a5711c0f170b0187426985bf7c37c2899 inherit pro_methods_classlibemb_1_1_singleton"><td class="memItemLeft" align="right" valign="top"><a id="a5711c0f170b0187426985bf7c37c2899"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Singleton</b> (const <a class="el" href="classlibemb_1_1_singleton.html">Singleton</a> &amp;)=delete</td></tr>
<tr class="separator:a5711c0f170b0187426985bf7c37c2899 inherit pro_methods_classlibemb_1_1_singleton"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf1e2baae526b76f4cb62845fb971948 inherit pro_methods_classlibemb_1_1_singleton"><td class="memItemLeft" align="right" valign="top"><a id="abf1e2baae526b76f4cb62845fb971948"></a>
<a class="el" href="classlibemb_1_1_singleton.html">Singleton</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classlibemb_1_1_singleton.html">Singleton</a> &amp;)=delete</td></tr>
<tr class="separator:abf1e2baae526b76f4cb62845fb971948 inherit pro_methods_classlibemb_1_1_singleton"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>日志管理器 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="abbfb81e4a48511453345c96466e1b4ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbfb81e4a48511453345c96466e1b4ec">&#9670;&nbsp;</a></span>createLogger()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::LoggerManager::createLogger </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>logName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rotations</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取日志器 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logName</td><td>日志名称(日志管理器会在日志根目录下自动创建logName.log的日志文件) </td></tr>
    <tr><td class="paramname">maxSize</td><td>单个文件最大大小 </td></tr>
    <tr><td class="paramname">rotations</td><td>循环记录文件个数(0:不循环记录,&gt;=1:至多创建rotations个记录文件) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
<dl class="section note"><dt>Note</dt><dd>循环记录文件命名为logNameDD,DD是整数(例:rotations=1时,当logName达到maxSize后, 将创建一个logName01文件用于循环记录) </dd></dl>

</div>
</div>
<a id="a80a19c32c8089b78829e4c6328565fe1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80a19c32c8089b78829e4c6328565fe1">&#9670;&nbsp;</a></span>getLogger()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="classlibemb_1_1_logger.html">Logger</a> &gt; libemb::LoggerManager::getLogger </td>
          <td>(</td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"><em>logName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取日志器 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logName</td><td>日志名称 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::shared_ptr&lt;Logger&gt; 日志器 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>日志管理器根据日志名称来区别日志 </dd></dl>

</div>
</div>
<a id="a0e793558661362cf0510d7f98a8d03c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e793558661362cf0510d7f98a8d03c9">&#9670;&nbsp;</a></span>setRoot()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libemb::LoggerManager::setRoot </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>logDir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置日志根目录 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logDir</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_logger_8h_source.html">Logger.h</a></li>
<li>src/Logger.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
